import json
import requests

import keystone
keystone_s=keystone.getToken()
token=keystone_s['token']
project_id=keystone_s['project_id']

headers={
    "X-Auth-Token":keystone_s['token']
}

compute_url="http://192.168.100.10:8774/v2.1/servers/"
compute_id="22675971-73a0-49cc-ab1c-59888bf520cf"
req=requests.delete(compute_url+compute_id,headers=headers)
print (req.url)
print(req.status_code)
if req.status_code==204:
    print ("删除成功")